package com.wwg.market.ui.service.dto;

import com.google.gwt.user.client.rpc.IsSerializable;
import com.wwfish.gwt.reflection.util.IFishDto;

import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: Tom
 * Date: 2011-11-10
 * Time: 18:13:26
 * To change this template use File | Settings | File Templates.
 */
public abstract class BaseDto implements Serializable, IsSerializable, IFishDto {
    public Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof BaseDto)) return false;

        BaseDto baseDto = (BaseDto) o;

        if (id != null ? !id.equals(baseDto.id) : baseDto.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }
}
